package com.struct.factory
{
	import com.struct.graph.login.LoginFrame;
	import com.struct.graph.login.LoginGraphWorker;
	
	import sacu.s.Factory;
	import sacu.s.worker.GraphWorker;
	
	public class LoginFactory extends Factory
	{
		public var loginGW:LoginGraphWorker;
		public var login:LoginFrame;
		public function LoginFactory(Name:String)
		{
			super(Name);
		}
		override public function startFactory(...parameters):void{
			super.startFactory();
		}
		override protected function onInitFactory():void{
			super.onInitFactory();
			login = new LoginFrame();
			loginGW = new LoginGraphWorker("LoginGraphWorker", login);
		}
		override protected function onStartFactory():void{
			super.onStartFactory();
			registerGraphicsWorker(loginGW);
			SSA.application.uiLayer.addChild(login);
		}
		override public function disposeFactory():void{
			super.disposeFactory();
			removeGraphicsWorker(loginGW.eName);
			SSA.application.uiLayer.removeChild(login);
		}
	}
}